<div class="pub-body">
    <!-- <h1>公司管理</h1> -->
    <!-- 公司列表 -->
    <div class="project">
        <el-button icon="el-icon-plus" class="addBtn" type="primary" @click="dialogCompanyOpen">新增模板</el-button>
        <el-table :data="companyData" border style="width: 100%" :header-cell-style="{background:'#eef1f6',color:'#606266'}">
            <el-table-column prop="id" label="模板编号" width="200"></el-table-column>
            <el-table-column prop="name" label="模板名称" width="200"></el-table-column>
<!--            <el-table-column prop="classify" label="项目分类"></el-table-column>-->
<!--            <el-table-column prop="type" label="专项类型" width="200"></el-table-column>-->
            <el-table-column prop="time" label="创建时间"></el-table-column>
            <el-table-column prop="person" label="创建人"></el-table-column>

            <el-table-column fixed="right" label="操作" width="280">
                <template slot-scope="scope">
                    <el-button @click="lookTemplateOpen(scope.row)" type="primary" icon="el-icon-tickets" size="small">查看模板</el-button>
                    <el-button @click="updateTemplateOpen(scope.row)" type="warning" icon="el-icon-edit-outline" size="small">修改模板</el-button>
                </template>
            </el-table-column>
        </el-table>
    </div>

    <!-- 新增模板弹窗 -->
    <el-dialog width="1000px" :title="dialogCompany.title" :visible.sync="dialogCompany.status">
        <el-form ref="companyFrom" :rules="companyRules" :model="companyFrom" label-width="160px">
            <el-row>
                <el-col :span="12">
                    <el-form-item prop="companyName" label="模板名称">
                        <el-input style="width: 300px;" placeholder="请输入模板名称" v-model="companyFrom.companyName"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item prop="companyContact" label="创建人">
                        <el-input style="width: 300px;" placeholder="请输入创建人" v-model="companyFrom.companyContact"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="12">
                    <el-form-item prop="restrictedType" label="创建时间">
                        <el-col class="dateCol" :span="12">
                            <el-date-picker type="date" placeholder="创建时间" v-model="companyFrom.restrictedType" style="width: 100%;"></el-date-picker>
                        </el-col>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-form-item>

                <el-button type="success" @click="dialogShow.viewNode=true">编辑节点</el-button>
                <el-button type="primary" @click="addCompany('companyFrom')">确定</el-button>
                <el-button @click="resetCompany">取消</el-button>
            </el-form-item>
        </el-form>
    </el-dialog>
    <!-- 查看模板弹窗 -->
    <el-dialog width="1000px" :title="looktemplate.title" :visible.sync="looktemplate.status">
        <el-table :data="lookdata" border style="width: 100%" :header-cell-style="{background:'#eef1f6',color:'#606266'}">
            <el-table-column prop="id" label="模板编号" width="200"></el-table-column>
            <el-table-column prop="name" label="模板名称" width="200"></el-table-column>
            <el-table-column prop="classify" label="项目分类"></el-table-column>
            <el-table-column prop="type" label="专项类型" width="200"></el-table-column>
            <el-table-column prop="time" label="创建时间"></el-table-column>
            <el-table-column prop="person" label="创建人"></el-table-column>
            <el-table-column prop="taskid" label="节点编号"></el-table-column>
            <el-table-column prop="task" label="节点"></el-table-column>
        </el-table>
    </el-dialog>
     <!-- 修改模板弹窗 -->
     <el-dialog width="1000px" :title="updatetemplate.title" :visible.sync="updatetemplate.status">
        <el-form ref="companyFrom" :rules="companyRules" :model="companyFrom" label-width="160px">
            <el-row>
                <el-col :span="12">
                    <el-form-item prop="companyName" label="模板名称">
                        <el-input style="width: 300px;" placeholder="请输入模板名称" v-model="companyFrom.companyName"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item prop="companyContact" label="创建人">
                        <el-input style="width: 300px;" placeholder="请输入创建人" v-model="companyFrom.companyContact"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="12">
                    <el-form-item prop="companyTel" label="项目分类">
                        <el-select style="width: 300px;" v-model="companyFrom.companyTel" placeholder="请选择项目类型">
                            <el-option label="楼宇" value="1"></el-option>
                            <el-option label="市政" value="2"></el-option>
                            <el-option label="其他" value="3"></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item prop="requisitionLimit" label="专项名称">
                        <el-select style="width: 300px;" v-model="companyFrom.requisitionLimit" placeholder="请选择专项">
                            <el-option label="土地" value="1"></el-option>
                            <el-option label="前期" value="2"></el-option>
                            <el-option label="其他" value="3"></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="12">
                    <el-form-item prop="restrictedType" label="创建时间">
                        <el-col class="dateCol" :span="12">
                            <el-date-picker type="date" placeholder="创建时间" v-model="companyFrom.restrictedType" style="width: 100%;"></el-date-picker>
                        </el-col>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-form-item prop="restrictedType1" label="选择节点">
                        <el-transfer v-model="companyFrom.restrictedType1" @change="handleChange" :data="tempData"></el-transfer>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-form-item>
                <el-button type="primary" @click="addCompany('companyFrom')"><span v-text="dialogCompany.title"></span></el-button>
                <el-button @click="resetCompany">重置</el-button>
            </el-form-item>
        </el-form>
     </el-dialog>
</div>
